10.3. Other updates

Based on the example above we present some XML fragments for different kinds of update. These include:

  • Addition of properties

  • Removal of properties

  • Addition of parameters to properties

  • Removal of parameters from properties

  • Changing parameter values.

The examples all start with the selection of the vevent properties element. First we have the XML for the addition of a tzid to the start date/time. Here we select the dtstart, then the parameters element then add a tzid parameter and change the value of the date and time

<ns2:properties>
  <ns2:property>
    <ns3:dtstart>
      <ns3:date-time>2011-07-18T15:00:00Z</ns3:date-time>
    </ns3:dtstart>
    <ns2:parameters>
      <ns2:add>
        <ns3:tzid>
          <ns3:text>America/New_York</ns3:text>
        </ns3:tzid>
      </ns2:add>
    </ns2:parameters>
    <ns2:change>
      <ns3:dtstart>
        <ns3:date-time>2011-07-18T11:00:00</ns3:date-time>
      </ns3:dtstart>
    </ns2:change>
  </ns2:property>
</ns2:properties>

In this example we add two categories to the event.

<ns2:properties>
  <ns2:add>
    <ns3:categories>
      <ns3:text>paper</ns3:text>
    </ns3:categories>
  </ns2:add>
  <ns2:add>
    <ns3:categories>
      <ns3:text>resources</ns3:text>
    </ns3:categories>
  </ns2:add>
</ns2:properties>

In this example we add a duration and remove the dtend.

<ns2:properties>
  <ns2:remove>
    <ns3:dtend>
      <ns3:date-time>2011-07-18T16:00:00Z</ns3:date-time>
    </ns3:dtend>
  </ns2:remove>
  <ns2:add>
    <ns3:duration>
      <ns3:duration>PT1H</ns3:duration>
    </ns3:duration>
  </ns2:add>
</ns2:properties>

In this example we change the dtstart timezone identifier.

<ns2:properties>
  <ns2:property>
    <ns3:dtstart>
      <ns3:parameters>
        <ns3:tzid>
          <ns3:text>America/New_York</ns3:text>
        </ns3:tzid>
      </ns3:parameters>
      <ns3:date-time>2011-07-18T11:00:00</ns3:date-time>
    </ns3:dtstart>
  <ns2:parameters>
    <ns2:parameter>
      <ns3:tzid>
        <ns3:text>America/New_York</ns3:text>
      </ns3:tzid>
      <ns2:change>
        <ns3:tzid>
          <ns3:text>America/Montreal</ns3:text>
        </ns3:tzid>
      </ns2:change>
    </ns2:parameter>
  </ns2:parameters>
  </ns2:property>
</ns2:properties>